package tech.aistar.day01.HomeWork;

import java.util.Arrays;

public class EmployeeTest {
    public static void main(String[] args) {
        //创建上司
        Employee boss = new Employee(1,"admin",2500.0d);
        boss.setEmployees(new Employee[0]);

        //2. 定义下属
        Employee e2 = new Employee(2,"tom",3000.0d);
        Employee e3 = new Employee(3,"admin",1000.0d);
        Employee e4 = new Employee(4,"jack",1500.0d);
        Employee e5 = new Employee(5,"ming",4000.0d);
        Employee e6 = new Employee(6,"mike",1500.0d);

        //3. boss添加
        boss.addEmp(e2);
        boss.addEmp(e3);
        boss.addEmp(e4);
        boss.addEmp(e5);
        boss.addEmp(e6);

        //4.boss删除指定id
        boss.delById(1);
        //boss根据指定薪水删除
        boss.delByPrice(1500.0d);
        //输出boss信息
        System.out.println(boss);
        //输出成员数量
        boss.countOfEmployees();
        //输出所有下属信息
        System.out.println(Arrays.toString(boss.getEmployees()));
    }
}